<?php

/**
 * Description of Helpers_Tagcloud
 *
 * @author a.novikov
 */
class Helpers_Tagcloud extends Helpers_Base {

	public function getViewPath() {
		return 'layouts/blocks/tagcloud.tpl';
	}

	public function tagcloud(Db_Rowset $rowset = NULL, $classSuffix = '') {
		if (!$rowset) {
			$rowset = TagPeer::getInstance()->fetchAll();
		}

		$this->view->class_suffix = (string)$classSuffix;
		
		$this->view->tags = ContentList::factoryByClassName('List_Tag_Cloud', $rowset);

		return $this->render();
	}
}